page.tsx 762 B

123456789101112131415161718192021222324252627
  1. import React from 'react'
  2. import { getLocaleOnServer } from '@/i18n/server'
  3. import { useTranslation } from '@/i18n/i18next-serverside-config'
  4. import Form from '@/app/components/datasets/settings/form'
  5. type Props = {
  6. params: { datasetId: string }
  7. }
  8. const Settings = async ({
  9. params: { datasetId },
  10. }: Props) => {
  11. const locale = getLocaleOnServer()
  12. const { t } = await useTranslation(locale, 'dataset-settings')
  13. return (
  14. <div className='bg-white h-full overflow-y-auto'>
  15. <div className='px-6 py-3'>
  16. <div className='mb-1 text-lg font-semibold text-gray-900'>{t('title')}</div>
  17. <div className='text-sm text-gray-500'>{t('desc')}</div>
  18. </div>
  19. <Form datasetId={datasetId} />
  20. </div>
  21. )
  22. }
  23. export default Settings